home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2005 March
/
CMCD0305.ISO
/
Software
/
Shareware
/
Utilitare
/
emu
/
Emu8086_Setup_307c.exe
/
{app}
/
Samples
/
Thermometer.asm
< prev
next >
Wrap
Assembly Source File
|
2004-05-25
|
1KB
|
59 lines
; This short program for Emu8086 shows
; how to keep constant temperature using
; heater and thermometer (between 60 ░C to 80 ░C),
; it is assumed that air temperature is lower 60 ░C.
; "Thermometer.exe" should be copied to "DEVICES" folder
; of Emu8086 (to enable running it from the menu).
; WARNING! DO NOT RUN TWO OR MORE INSTANCES OF
; "Thermometer.exe", THIS WILL CAUSE A DEVICE CONFLICT
; AND HEATER WON'T OPERATE CORRECTLY.
; Temperature rises fast, thus Emulator should be set
; to run at the maximum speed (set "step delay" to zero).
; The code is fully demonstrational, ░C can be replaced
; by ░F without any doubt.
; For questions please feel free to e-mail:
; info@emu8086.com
; You should have Emu8086 to run this code,
; the latest version of Emu8086 can be found here:
;
; http://www.emu8086.com
;
#make_bin#
#CS = 500#
#IP = 0#
; Set Data Segment to Code Segment:
MOV AX, CS
MOV DS, AX
START:
IN AL, 125
CMP AL, 60
JL low
CMP AL, 80
JLE ok
JG high
low:
MOV AL, 1
OUT 127, AL ; turn heater "on".
JMP ok
high:
MOV AL, 0
OUT 127, AL ; turn heater "off".
ok:
JMP START ; endless loop.